package cn.wolfcode.luowowo.search.template;
import lombok.Getter;
import lombok.Setter;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.io.Serializable;

@Getter@Setter
@Document(indexName="luowowo_scenicspot",type="scenicspot")
public class ScenicspotTemplate implements Serializable {
    public static final String INDEX_NAME = "luowowo_scenicspot";
    public static final String TYPE_NAME = "scenicspot";

    @Id
    //@Field 每个文档的字段配置（类型、是否分词、是否存储、分词器 ）
    @Field(store=true, index = false,type = FieldType.Long)
    private Long id;

    @Field(index=true,store=true,type = FieldType.Keyword)
    private String name;

    @Field(index=true,store=true,type = FieldType.Keyword)
    private String coverUrl;

    @Field(index=true,store=true,type = FieldType.Keyword)
    private String catalog;
}
